package com.xb.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author xbyan
 * @date 2023/7/6 17:01
 */
@Controller
public class PageController {
    @RequestMapping({"/", "/index", "index", "/loginUI"})
    public String index() {
        return "/view/index";
    }


    @RequestMapping("/home")
    public String home() {
        return "/view/home";
    }

    @RequestMapping("/main")
    public String mainHtml() {
        return "/view/main";
    }

    @RequestMapping("/register/register")
    @RequiresPermissions("system:register:*")
    public String register() {
        return "/register/register";
    }

    @RequestMapping("/register/registerRecord")
    public String registerRecord() {
        return "/register/registerRecord";
    }

    @RequestMapping("/outpatient/outpatient")
    @RequiresPermissions("system:outpatient:*")
    public String outpatient() {
        return "/outpatient/outpatient";
    }

    @RequestMapping("/outpatient/medicalRecord")
    @RequiresPermissions("system:medicalRecord:*")
    public String medicalRecord() {
        return "/outpatient/medicalRecord";
    }

    @RequestMapping("/medicalExamination/medicalExamination")
    @RequiresPermissions("system:medicalExamination:*")
    public String medicalExamination() {
        return "/medicalExamination/medicalExamination";
    }

    @RequestMapping("/drugStore/drugManage")
    @RequiresPermissions("system:drugStore:*")
    public String drugManage() {
        return "/drugStore/drugManage";
    }

    @RequestMapping("/drugStore/storageManage")
//    @RequiresPermissions("system:medicalExamination:*")
    public String storageManage() {
        return "/drugStore/storageManage";
    }

    @RequestMapping("/toll/outpatientToll")
    @RequiresPermissions("system:toll:*")
    public String outpatientToll() {
        return "/toll/outpatientToll";
    }

    @RequestMapping("/toll/examinationToll")
//    @RequiresPermissions("system:drugStore:*")
    public String examinationToll() {
        return "/toll/examinationToll";
    }

    @RequestMapping("/takingDrug/takingDrug")
    @RequiresPermissions("system:takingDrug:*")
    public String takingDrug() {
        return "/takingDrug/takingDrug";
    }

    @RequestMapping("/userInfo")
    @RequiresPermissions("system:toUserinfo:*")
    public String userInfo() {
        return "/userInfo";
    }
    @RequestMapping("*")
    public String notFound() {
        return "/errors/404";
    }


}
